
class Dialog < Pan::Component
  def initialize(title, message, owner)
    @title = title
    @message = message
    @owner = owner
  end

  def render_on(html)
    html.div("class"=>"dialog") {
      html.heading(@title,3) 
      html.p {
        html.text(@message)
      }
      html.link("Close") {
        owner.pop
      }
    }
  end

end
